package com.naiterui.ehp.bs.doctor.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;

/**
 * @author guoyongxiang
 * @date 2020/2/21 18:33
 * @since 1.0.0
 */
@Data
@Entity
@Table(name = "standard_dict")
public class StandardDict {

    /**
     * 民族 {@value}
     */
    public static final Integer TYPE_NATION = 1;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 类型(1:民族)
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 编码
     */
    @Column(name = "code")
    private String code;

    /**
     * 名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    @Version
    private Integer version;
}
